<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>登录成功</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            background-color: #f0f0f0;
            margin: 0;
            padding: 20px;
            display: flex;
            justify-content: center;
            align-items: center;
            min-height: 100vh;
        }
        .container {
            background-color: #fff;
            padding: 40px;
            border-radius: 10px;
            box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
            max-width: 500px;
            width: 100%;
            text-align: center;
        }
        .success-icon {
            font-size: 64px;
            color: #28a745;
            margin-bottom: 20px;
        }
        h1 {
            color: #28a745;
            margin-bottom: 20px;
        }
        .user-info {
            background-color: #f8f9fa;
            padding: 15px;
            border-radius: 5px;
            margin: 20px 0;
            text-align: left;
        }
        .user-info p {
            margin: 5px 0;
            color: #555;
        }
        .btn-group {
            margin-top: 30px;
        }
        .btn {
            padding: 12px 24px;
            margin: 0 10px;
            border: none;
            border-radius: 5px;
            font-size: 16px;
            cursor: pointer;
            text-decoration: none;
            display: inline-block;
        }
        .btn-primary {
            background-color: #007bff;
            color: white;
        }
        .btn-secondary {
            background-color: #6c757d;
            color: white;
        }
        .btn:hover {
            opacity: 0.9;
            transform: translateY(-2px);
            transition: all 0.3s ease;
        }
    </style>
</head>
<body>
    <div class="container">
        <div class="success-icon">✓</div>
        <h1>登录成功！</h1>
        <p>恭喜您已成功登录系统</p>
        
        <div class="user-info" id="userInfo">
            <p><strong>登录信息：</strong></p>
            <p id="loginTime">登录时间：</p>
            <p id="userAgent">浏览器信息：</p>
        </div>
        
        <div class="btn-group">
            <a href="/" class="btn btn-primary">返回首页</a>
            <a href="/login.html" class="btn btn-secondary">重新登录</a>
        </div>
    </div>

    <script>
        // 页面加载时显示弹窗
        window.addEventListener('load', function() {
            // 显示浏览器原生弹窗
            alert('🎉 登录成功！欢迎使用我们的系统！');
            
            // 更新用户信息
            const urlParams = new URLSearchParams(window.location.search);
            const username = urlParams.get('username');
            
            if (username) {
                document.getElementById('userInfo').innerHTML += `
                    <p><strong>用户名：</strong>${decodeURIComponent(username)}</p>
                `;
            }
            
            // 显示登录时间
            const now = new Date();
            document.getElementById('loginTime').textContent = 
                `登录时间：${now.toLocaleString('zh-CN')}`;
            
            // 显示浏览器信息
            document.getElementById('userAgent').textContent = 
                `浏览器信息：${navigator.userAgent}`;
        });

        // 添加一些交互效果
        document.addEventListener('DOMContentLoaded', function() {
            // 添加进入动画
            const container = document.querySelector('.container');
            container.style.opacity = '0';
            container.style.transform = 'translateY(20px)';
            
            setTimeout(() => {
                container.style.transition = 'all 0.5s ease';
                container.style.opacity = '1';
                container.style.transform = 'translateY(0)';
            }, 100);
        });
    </script>
</body>
</html>